package com.rich.user.controller;

import com.rich.user.service.UserHouseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author minicoco
 * @version 1.0
 * @date 2021/8/18 18:44
 */
@RestController
@RequestMapping("/user/house")
public class UserHouseController {

    @Autowired
    private UserHouseService userHouseService;

    /**
     * 用户收藏房源
     * @param userId
     * @param houseId
     */
    @GetMapping("/collectHouse/{userId}/{houseId}")
    public void collectHouse(@PathVariable("userId")Long userId, @PathVariable("houseId") String houseId){
        //TODO 用户id应该是登录用户id
        userHouseService.collectHouse(userId,houseId);
    }

}
